home *** CD-ROM | disk | FTP | other *** search
-
- /* A Bison parser, made from xbwparser.y with Bison version GNU Bison version 1.22
- */
-
- #define YYBISON 1 /* Identify Bison output. */
-
- #define ENDFILE 258
- #define IF 259
- #define THEN 260
- #define NULLPTR 261
- #define NPTR 262
- #define SPTR 263
- #define IPTR 264
- #define DPTR 265
- #define STR 266
- #define NUM 267
- #define STRVAR 268
- #define NUMVAR 269
- #define LOPRE 270
- #define NEG 271
- #define HIPRE 272
-
- #line 1 "xbwparser.y"
-
- /*{{{ */
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <math.h>
- #include "xbw.h"
- #include "xbwtype.h"
-
- /*{{{F xbwtype.h*/
- /*:::F xbwtype.h*/
- /*}}} */
-
- #define XbWFSy_bf1_printf(a) XbWFSy_bf_printf("%s",a)
-
- char scratch[scratchmax][200];
- int scratchno=0;
- int IFTHEN_val = 1;
-
- int errcnt=0;
-
- void *(fpar)[100];
- double (fpard)[100];
- int (fpart)[100];
- int fpar_count=0;
- char func_lastname[100]="!!Uninitialized!!";
-
- #define MAX_mac_lvl 100
- #define MAX_fpar 100
-
- void *(macpar)[MAX_mac_lvl][MAX_fpar];
- int (macpar_type)[MAX_mac_lvl][MAX_fpar];
- int macparlvl=1;
- int macpar_count=0;
-
- void fpar_add(
- int type,
- char *txt,
- double dval,
- int ival,
- XbWDDb_DbIVar *ptr);
- double fpar_call(char *name);
- int macpar_call(char *name);
-
- /*}}} */
-
-
- #line 48 "xbwparser.y"
- typedef union { XbWDDb_DbIVar *ptr; char *strp; double val; symrec *tptr; } YYSTYPE;
-
- #ifndef YYLTYPE
- typedef
- struct yyltype
- {
- int timestamp;
- int first_line;
- int first_column;
- int last_line;
- int last_column;
- char *text;
- }
- yyltype;
-
- #define YYLTYPE yyltype
- #endif
-
- #include <stdio.h>
-
- #ifndef __cplusplus
- #ifndef __STDC__
- #define const
- #endif
- #endif
-
-
-
- #define YYFINAL 182
- #define YYFLAG -32768
- #define YYNTBASE 36
-
- #define YYTRANSLATE(x) ((unsigned)(x) <= 272 ? yytranslate[x] : 45)
-
- static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 20, 2, 2, 2, 2, 2, 2, 27,
- 26, 23, 22, 25, 21, 30, 24, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 31, 32, 19,
- 17, 18, 16, 33, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 29, 2, 28, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 34, 35
- };
-
- #if YYDEBUG != 0
- static const short yyprhs[] = { 0,
- 0, 1, 4, 6, 8, 14, 20, 26, 32, 35,
- 40, 45, 49, 53, 57, 62, 69, 75, 81, 87,
- 93, 99, 105, 114, 123, 126, 131, 134, 137, 140,
- 142, 144, 146, 152, 154, 160, 166, 172, 174, 178,
- 183, 188, 192, 196, 201, 206, 211, 215, 219, 223,
- 227, 230, 234, 238, 243, 247, 251, 256, 261, 266,
- 268, 270, 272, 274, 276, 280, 284
- };
-
- static const short yyrhs[] = { -1,
- 36, 37, 0, 32, 0, 3, 0, 14, 31, 17,
- 43, 32, 0, 14, 22, 17, 43, 32, 0, 13,
- 31, 17, 44, 32, 0, 13, 22, 17, 43, 32,
- 0, 38, 32, 0, 11, 27, 26, 32, 0, 31,
- 39, 26, 32, 0, 16, 38, 32, 0, 16, 43,
- 32, 0, 16, 44, 32, 0, 4, 27, 43, 26,
- 0, 33, 11, 27, 39, 26, 32, 0, 33, 11,
- 27, 26, 32, 0, 40, 31, 17, 40, 32, 0,
- 41, 31, 17, 44, 32, 0, 42, 31, 17, 43,
- 32, 0, 42, 22, 17, 43, 32, 0, 42, 21,
- 17, 43, 32, 0, 42, 22, 17, 43, 29, 43,
- 28, 32, 0, 42, 21, 17, 43, 29, 43, 28,
- 32, 0, 1, 32, 0, 11, 27, 39, 26, 0,
- 39, 44, 0, 39, 43, 0, 39, 40, 0, 44,
- 0, 43, 0, 40, 0, 7, 31, 44, 30, 44,
- 0, 6, 0, 8, 31, 44, 30, 44, 0, 9,
- 31, 44, 30, 44, 0, 10, 31, 44, 30, 44,
- 0, 12, 0, 27, 14, 26, 0, 43, 17, 17,
- 43, 0, 43, 20, 17, 43, 0, 43, 19, 43,
- 0, 43, 18, 43, 0, 43, 19, 17, 43, 0,
- 43, 18, 17, 43, 0, 43, 19, 18, 43, 0,
- 43, 22, 43, 0, 43, 21, 43, 0, 43, 24,
- 43, 0, 43, 23, 43, 0, 21, 43, 0, 27,
- 43, 26, 0, 29, 43, 28, 0, 44, 17, 17,
- 44, 0, 44, 18, 44, 0, 44, 19, 44, 0,
- 44, 18, 17, 44, 0, 44, 19, 17, 44, 0,
- 44, 20, 17, 44, 0, 38, 0, 42, 0, 11,
- 0, 41, 0, 13, 0, 44, 25, 44, 0, 27,
- 44, 26, 0, 29, 44, 28, 0
- };
-
- #endif
-
- #if YYDEBUG != 0
- static const short yyrline[] = { 0,
- 89, 90, 92, 94, 95, 96, 97, 98, 103, 104,
- 105, 106, 109, 110, 112, 114, 115, 117, 138, 160,
- 188, 216, 244, 278, 312, 314, 315, 317, 318, 319,
- 320, 321, 323, 326, 332, 336, 339, 343, 344, 345,
- 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
- 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
- 366, 395, 398, 419, 422, 433, 436
- };
-
- static const char * const yytname[] = { "$","error","$illegal.","ENDFILE",
- "IF","THEN","NULLPTR","NPTR","SPTR","IPTR","DPTR","STR","NUM","STRVAR","NUMVAR",
- "LOPRE","'?'","'='","'>'","'<'","'!'","'-'","'+'","'*'","'/'","','","')'","'('",
- "']'","'['","'.'","':'","';'","'@'","NEG","HIPRE","input","statement","funcresult",
- "funcpar","nptrexp","sptrexp","iptrexp","numexp","strexp",""
- };
- #endif
-
- static const short yyr1[] = { 0,
- 36, 36, 37, 37, 37, 37, 37, 37, 37, 37,
- 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
- 37, 37, 37, 37, 37, 38, 39, 39, 39, 39,
- 39, 39, 40, 40, 41, 42, 42, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 44, 44, 44, 44, 44, 44
- };
-
- static const short yyr2[] = { 0,
- 0, 2, 1, 1, 5, 5, 5, 5, 2, 4,
- 4, 3, 3, 3, 4, 6, 5, 5, 5, 5,
- 5, 5, 8, 8, 2, 4, 2, 2, 2, 1,
- 1, 1, 5, 1, 5, 5, 5, 1, 3, 4,
- 4, 3, 3, 4, 4, 4, 3, 3, 3, 3,
- 2, 3, 3, 4, 3, 3, 4, 4, 4, 1,
- 1, 1, 1, 1, 3, 3, 3
- };
-
- static const short yydefact[] = { 1,
- 0, 0, 4, 0, 34, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0, 2, 0, 0, 0,
- 0, 25, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 62, 38, 64, 0, 0, 0, 60, 63,
- 61, 0, 0, 60, 0, 32, 31, 30, 0, 9,
- 0, 0, 0, 0, 0, 0, 0, 62, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 51, 0, 0, 0, 0, 0, 12, 0, 0,
- 0, 0, 0, 0, 0, 0, 13, 0, 0, 0,
- 0, 0, 14, 0, 29, 28, 27, 0, 0, 0,
- 0, 0, 0, 15, 0, 0, 0, 0, 0, 0,
- 10, 26, 0, 0, 0, 0, 39, 52, 66, 53,
- 67, 0, 0, 43, 0, 0, 42, 0, 48, 47,
- 50, 49, 0, 0, 55, 0, 56, 0, 65, 11,
- 0, 0, 0, 0, 0, 0, 0, 33, 35, 36,
- 37, 8, 7, 6, 5, 40, 45, 44, 46, 41,
- 54, 57, 58, 59, 17, 0, 18, 19, 0, 22,
- 0, 21, 20, 16, 0, 0, 0, 0, 24, 23,
- 0, 0
- };
-
- static const short yydefgoto[] = { 1,
- 17, 44, 66, 46, 40, 41, 47, 57
- };
-
- static const short yypact[] = {-32768,
- 5, -29,-32768, 20,-32768, -9, 28, 30, 32, 56,
- 4, 24, 318, 289,-32768, 23,-32768, 55, 60, 71,
- 43,-32768, 318, 165, 165, 165, 165, 154, 81, 91,
- 94, 97, 95,-32768,-32768, 318, 122, 318, 93,-32768,
- -32768, 363, 435,-32768, 193,-32768, 507, 191, 110,-32768,
- 123, 127, 131, 135, 136, 487, 191,-32768, 165, 165,
- 3, 52, 98, 116, 125, 217, 318, 165, 318, 318,
- 289,-32768, 128, 497, 101, 451, 214,-32768, 138, 296,
- 31, 142, 318, 318, 318, 318,-32768, 153, 67, 68,
- 155, 165,-32768, 150,-32768, 507, 191, 241, 44, 165,
- 318, 318, 318,-32768, 75, -21, 165, 165, 165, 165,
- -32768,-32768, 379, -5, 395, 411,-32768,-32768,-32768,-32768,
- -32768, 318, 318, 235, 318, 318, 235, 318, 7, 7,
- -32768,-32768, 165, 165, 149, 165, 149, 165,-32768,-32768,
- 152, 265, 158, 37, 331, 347, 427, 149,-32768, 149,
- 149,-32768,-32768,-32768,-32768, 507, 507, 507, 235, 507,
- 149, 149, 149, 149,-32768, 159,-32768,-32768, 318,-32768,
- 318,-32768,-32768,-32768, 463, 475, 161, 163,-32768,-32768,
- 185,-32768
- };
-
- static const short yypgoto[] = {-32768,
- -32768, 16, -12, 0, 195, 196, -13, 79
- };
-
-
- #define YYLAST 531
-
-
- static const short yytable[] = { 42,
- 19, 45, 22, 92, 181, 2, 121, 3, 4, 56,
- 5, 6, 7, 8, 9, 10, 18, 11, 12, 92,
- 13, 24, 72, 74, 76, 29, 153, 92, 39, 85,
- 86, 96, 107, 49, 30, 14, 15, 16, 7, 8,
- 9, 33, 34, 35, 95, 31, 23, 125, 126, 5,
- 6, 36, 96, 113, 32, 115, 116, 37, 25, 38,
- 26, 92, 27, 53, 54, 95, 124, 127, 168, 129,
- 130, 131, 132, 55, 7, 7, 92, 58, 58, 35,
- 35, 108, 28, 134, 136, 142, 50, 145, 146, 147,
- 51, 43, 48, 59, 59, 60, 60, 67, 143, 92,
- 119, 52, 61, 62, 63, 64, 48, 68, 156, 157,
- 69, 158, 159, 70, 160, 75, 77, 88, 89, 90,
- 91, 71, 92, 97, 78, 92, 119, 109, 96, 7,
- 8, 9, 33, 34, 35, 73, 98, 105, 106, 99,
- 92, 95, 36, 100, 97, 110, 114, 101, 37, 48,
- 38, 102, 103, 117, 122, 175, 111, 176, 128, 5,
- 6, 7, 8, 9, 33, 34, 35, 135, 137, 133,
- 139, 138, 7, 92, 36, 58, 48, 35, 144, 65,
- 37, 140, 38, 165, 182, 148, 149, 150, 151, 167,
- 174, 59, 179, 60, 180, 20, 21, 0, 5, 6,
- 7, 8, 9, 33, 34, 35, 0, 88, 89, 90,
- 91, 161, 162, 36, 163, 92, 164, 0, 94, 37,
- 97, 38, 5, 6, 7, 8, 9, 33, 34, 35,
- 88, 89, 90, 91, 0, 0, 0, 36, 92, 0,
- 0, 121, 112, 37, 0, 38, 5, 6, 7, 8,
- 9, 33, 34, 35, 82, 83, 84, 85, 86, 0,
- 0, 36, 0, 0, 0, 0, 141, 37, 0, 38,
- 5, 6, 7, 8, 9, 33, 34, 35, 0, 0,
- 0, 0, 0, 0, 0, 36, 0, 0, 0, 0,
- 166, 37, 0, 38, 5, 6, 7, 8, 9, 33,
- 34, 35, 0, 7, 8, 9, 33, 34, 35, 36,
- 0, 0, 123, 0, 0, 37, 36, 38, 0, 0,
- 0, 0, 37, 0, 38, 7, 8, 9, 33, 34,
- 35, 0, 0, 0, 0, 0, 0, 0, 36, 0,
- 0, 0, 0, 0, 37, 0, 38, 79, 80, 81,
- 82, 83, 84, 85, 86, 0, 0, 0, 0, 169,
- 0, 0, 170, 79, 80, 81, 82, 83, 84, 85,
- 86, 0, 0, 0, 0, 171, 0, 0, 172, 79,
- 80, 81, 82, 83, 84, 85, 86, 0, 0, 0,
- 0, 0, 0, 0, 87, 79, 80, 81, 82, 83,
- 84, 85, 86, 0, 0, 0, 0, 0, 0, 0,
- 152, 79, 80, 81, 82, 83, 84, 85, 86, 0,
- 0, 0, 0, 0, 0, 0, 154, 79, 80, 81,
- 82, 83, 84, 85, 86, 0, 0, 0, 0, 0,
- 0, 0, 155, 79, 80, 81, 82, 83, 84, 85,
- 86, 88, 89, 90, 91, 0, 0, 0, 173, 92,
- 0, 0, 0, 0, 0, 0, 93, 79, 80, 81,
- 82, 83, 84, 85, 86, 0, 0, 0, 120, 79,
- 80, 81, 82, 83, 84, 85, 86, 0, 0, 0,
- 177, 79, 80, 81, 82, 83, 84, 85, 86, 0,
- 0, 0, 178, 79, 80, 81, 82, 83, 84, 85,
- 86, 0, 104, 79, 80, 81, 82, 83, 84, 85,
- 86, 0, 118, 79, 80, 81, 82, 83, 84, 85,
- 86
- };
-
- static const short yycheck[] = { 13,
- 1, 14, 32, 25, 0, 1, 28, 3, 4, 23,
- 6, 7, 8, 9, 10, 11, 1, 13, 14, 25,
- 16, 31, 36, 37, 38, 22, 32, 25, 13, 23,
- 24, 45, 30, 11, 31, 31, 32, 33, 8, 9,
- 10, 11, 12, 13, 45, 22, 27, 17, 18, 6,
- 7, 21, 66, 67, 31, 69, 70, 27, 31, 29,
- 31, 25, 31, 21, 22, 66, 80, 81, 32, 83,
- 84, 85, 86, 31, 8, 8, 25, 11, 11, 13,
- 13, 30, 27, 17, 17, 98, 32, 101, 102, 103,
- 31, 13, 14, 27, 27, 29, 29, 17, 99, 25,
- 26, 31, 24, 25, 26, 27, 28, 17, 122, 123,
- 17, 125, 126, 17, 128, 37, 38, 17, 18, 19,
- 20, 27, 25, 45, 32, 25, 26, 30, 142, 8,
- 9, 10, 11, 12, 13, 14, 27, 59, 60, 17,
- 25, 142, 21, 17, 66, 30, 68, 17, 27, 71,
- 29, 17, 17, 26, 17, 169, 32, 171, 17, 6,
- 7, 8, 9, 10, 11, 12, 13, 89, 90, 17,
- 92, 17, 8, 25, 21, 11, 98, 13, 100, 26,
- 27, 32, 29, 32, 0, 107, 108, 109, 110, 32,
- 32, 27, 32, 29, 32, 1, 1, -1, 6, 7,
- 8, 9, 10, 11, 12, 13, -1, 17, 18, 19,
- 20, 133, 134, 21, 136, 25, 138, -1, 26, 27,
- 142, 29, 6, 7, 8, 9, 10, 11, 12, 13,
- 17, 18, 19, 20, -1, -1, -1, 21, 25, -1,
- -1, 28, 26, 27, -1, 29, 6, 7, 8, 9,
- 10, 11, 12, 13, 20, 21, 22, 23, 24, -1,
- -1, 21, -1, -1, -1, -1, 26, 27, -1, 29,
- 6, 7, 8, 9, 10, 11, 12, 13, -1, -1,
- -1, -1, -1, -1, -1, 21, -1, -1, -1, -1,
- 26, 27, -1, 29, 6, 7, 8, 9, 10, 11,
- 12, 13, -1, 8, 9, 10, 11, 12, 13, 21,
- -1, -1, 17, -1, -1, 27, 21, 29, -1, -1,
- -1, -1, 27, -1, 29, 8, 9, 10, 11, 12,
- 13, -1, -1, -1, -1, -1, -1, -1, 21, -1,
- -1, -1, -1, -1, 27, -1, 29, 17, 18, 19,
- 20, 21, 22, 23, 24, -1, -1, -1, -1, 29,
- -1, -1, 32, 17, 18, 19, 20, 21, 22, 23,
- 24, -1, -1, -1, -1, 29, -1, -1, 32, 17,
- 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
- -1, -1, -1, -1, 32, 17, 18, 19, 20, 21,
- 22, 23, 24, -1, -1, -1, -1, -1, -1, -1,
- 32, 17, 18, 19, 20, 21, 22, 23, 24, -1,
- -1, -1, -1, -1, -1, -1, 32, 17, 18, 19,
- 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
- -1, -1, 32, 17, 18, 19, 20, 21, 22, 23,
- 24, 17, 18, 19, 20, -1, -1, -1, 32, 25,
- -1, -1, -1, -1, -1, -1, 32, 17, 18, 19,
- 20, 21, 22, 23, 24, -1, -1, -1, 28, 17,
- 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
- 28, 17, 18, 19, 20, 21, 22, 23, 24, -1,
- -1, -1, 28, 17, 18, 19, 20, 21, 22, 23,
- 24, -1, 26, 17, 18, 19, 20, 21, 22, 23,
- 24, -1, 26, 17, 18, 19, 20, 21, 22, 23,
- 24
- };
- /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
- #line 3 "/usr/lib/bison.simple"
-
- /* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-
- #ifndef alloca
- #ifdef __GNUC__
- #define alloca __builtin_alloca
- #else /* not GNU C. */
- #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
- #include <alloca.h>
- #else /* not sparc */
- #if defined (MSDOS) && !defined (__TURBOC__)
- #include <malloc.h>
- #else /* not MSDOS, or __TURBOC__ */
- #if defined(_AIX)
- #include <malloc.h>
- #pragma alloca
- #else /* not MSDOS, __TURBOC__, or _AIX */
- #ifdef __hpux
- #ifdef __cplusplus
- extern "C" {
- void *alloca (unsigned int);
- };
- #else /* not __cplusplus */
- void *alloca ();
- #endif /* not __cplusplus */
- #endif /* __hpux */
- #endif /* not _AIX */
- #endif /* not MSDOS, or __TURBOC__ */
- #endif /* not sparc. */
- #endif /* not GNU C. */
- #endif /* alloca not defined. */
-
- /* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
- /* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
-
- #define yyerrok (yyerrstatus = 0)
- #define yyclearin (yychar = YYEMPTY)
- #define YYEMPTY -2
- #define YYEOF 0
- #define YYACCEPT return(0)
- #define YYABORT return(1)
- #define YYERROR goto yyerrlab1
- /* Like YYERROR except do call yyerror.
- This remains here temporarily to ease the
- transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
- #define YYFAIL goto yyerrlab
- #define YYRECOVERING() (!!yyerrstatus)
- #define YYBACKUP(token, value) \
- do \
- if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
- goto yybackup; \
- } \
- else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
- while (0)
-
- #define YYTERROR 1
- #define YYERRCODE 256
-
- #ifndef YYPURE
- #define YYLEX yylex()
- #endif
-
- #ifdef YYPURE
- #ifdef YYLSP_NEEDED
- #define YYLEX yylex(&yylval, &yylloc)
- #else
- #define YYLEX yylex(&yylval)
- #endif
- #endif
-
- /* If nonreentrant, generate the variables here */
-
- #ifndef YYPURE
-
- int yychar; /* the lookahead symbol */
- YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
-
- #ifdef YYLSP_NEEDED
- YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
- #endif
-
- int yynerrs; /* number of parse errors so far */
- #endif /* not YYPURE */
-
- #if YYDEBUG != 0
- int yydebug; /* nonzero means print parse trace */
- /* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
- #endif
-
- /* YYINITDEPTH indicates the initial size of the parser's stacks */
-
- #ifndef YYINITDEPTH
- #define YYINITDEPTH 200
- #endif
-
- /* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
-
- #if YYMAXDEPTH == 0
- #undef YYMAXDEPTH
- #endif
-
- #ifndef YYMAXDEPTH
- #define YYMAXDEPTH 10000
- #endif
-
- /* Prevent warning if -Wstrict-prototypes. */
- #ifdef __GNUC__
- int yyparse (void);
- #endif
-
- #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
- #define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
- #else /* not GNU C or C++ */
- #ifndef __cplusplus
-
- /* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
- static void
- __yy_bcopy (from, to, count)
- char *from;
- char *to;
- int count;
- {
- register char *f = from;
- register char *t = to;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
- }
-
- #else /* __cplusplus */
-
- /* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
- static void
- __yy_bcopy (char *from, char *to, int count)
- {
- register char *f = from;
- register char *t = to;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
- }
-
- #endif
- #endif
-
- #line 184 "/usr/lib/bison.simple"
- int
- yyparse()
- {
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
-
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
-
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
-
- #ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-
- #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
- #else
- #define YYPOPSTACK (yyvsp--, yyssp--)
- #endif
-
- int yystacksize = YYINITDEPTH;
-
- #ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
- #ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
- #endif
- #endif
-
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
-
- int yylen;
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
- #endif
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
-
- yyssp = yyss - 1;
- yyvsp = yyvs;
- #ifdef YYLSP_NEEDED
- yylsp = yyls;
- #endif
-
- /* Push a new state, which is found in yystate . */
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
- yynewstate:
-
- *++yyssp = yystate;
-
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* Give user a chance to reallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
- #ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
- #endif
-
- /* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
-
- #ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
- #ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
- #else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
- #endif
-
- yyss = yyss1; yyvs = yyvs1;
- #ifdef YYLSP_NEEDED
- yyls = yyls1;
- #endif
- #else /* no yyoverflow */
- /* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- return 2;
- }
- yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
- yystacksize = YYMAXDEPTH;
- yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
- __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
- __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
- #ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
- __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
- #endif
- #endif /* no yyoverflow */
-
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
- #ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
- #endif
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
- #endif
-
- if (yyssp >= yyss + yystacksize - 1)
- YYABORT;
- }
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
- #endif
-
- goto yybackup;
- yybackup:
-
- /* Do appropriate processing given the current state. */
- /* Read a lookahead token if we need one and don't already have one. */
- /* yyresume: */
-
- /* First try to decide what to do without reference to lookahead token. */
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
-
- if (yychar == YYEMPTY)
- {
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
- #endif
- yychar = YYLEX;
- }
-
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
- {
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
- #endif
- }
- else
- {
- yychar1 = YYTRANSLATE(yychar);
-
- #if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
- #ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
- #endif
- fprintf (stderr, ")\n");
- }
- #endif
- }
-
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
- goto yydefault;
-
- yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrlab;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the lookahead token. */
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
- #endif
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
- #ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
- #endif
-
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
-
- yystate = yyn;
- goto yynewstate;
-
- /* Do the default action for the current state. */
- yydefault:
-
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
-
- /* Do a reduction. yyn is the number of a rule to reduce with. */
- yyreduce:
- yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-
- #if YYDEBUG != 0
- if (yydebug)
- {
- int i;
-
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
-
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
- #endif
-
-
- switch (yyn) {
-
- case 4:
- #line 94 "xbwparser.y"
- { fpar_call("End"); ;
- break;}
- case 5:
- #line 95 "xbwparser.y"
- { yyvsp[-4].tptr->value.var = yyvsp[-1].val; ;
- break;}
- case 6:
- #line 96 "xbwparser.y"
- { yyvsp[-4].tptr->value.var += yyvsp[-1].val; ;
- break;}
- case 7:
- #line 97 "xbwparser.y"
- { strcpy(yyvsp[-4].tptr->value.strp,yyvsp[-1].strp); ;
- break;}
- case 8:
- #line 98 "xbwparser.y"
- {
- char sstr[100];
- sprintf(sstr,"%d",(int)yyvsp[-1].val);
- strcat(yyvsp[-4].tptr->value.strp,sstr);
- ;
- break;}
- case 9:
- #line 103 "xbwparser.y"
- { ; ;
- break;}
- case 10:
- #line 104 "xbwparser.y"
- { fpar_call(yyvsp[-3].strp); ;
- break;}
- case 11:
- #line 105 "xbwparser.y"
- { fpar_call(func_lastname); ;
- break;}
- case 12:
- #line 106 "xbwparser.y"
- {
- printf("\nResult= %17.7f",yyvsp[-1].val);
- ;
- break;}
- case 13:
- #line 109 "xbwparser.y"
- { printf("\nNUM =%15.9f",yyvsp[-1].val);;
- break;}
- case 14:
- #line 110 "xbwparser.y"
- { printf("\nSTR =%s",yyvsp[-1].strp);;
- break;}
- case 15:
- #line 112 "xbwparser.y"
- { IFTHEN_val = (int)yyvsp[-1].val; ;
- break;}
- case 16:
- #line 114 "xbwparser.y"
- { macpar_call(yyvsp[-4].strp); ;
- break;}
- case 17:
- #line 115 "xbwparser.y"
- { macpar_call(yyvsp[-3].strp); ;
- break;}
- case 18:
- #line 117 "xbwparser.y"
- {
- /*{{{ */
- {
- XbWDDb_DbIVar *TT=yyvsp[-4].ptr;
- if ((TT = (XbWDDb_DbIVar*)XbWFDb_VarInh(TT,0,NULL,0)) == NULL) {
- XbWFSy_bf1_printf("\nERROR: Pointer VAR Element not found!");
- errcnt=errcnt+1;
- }
- else {
- if ( (TT->tp & XbWDDb_Typ) == XbWDDb_NPtr){
- XbWDDb_DbINPtr *TTRG = (XbWDDb_DbINPtr *)TT;
- TTRG->inh = XbWDDb_C_PtrToDbI((char*)yyvsp[-1].ptr,XbWDDb_DbISys);
- }
- else {
- XbWFSy_bf1_printf("\nERROR: Target is no (ptr) VAR Element!");
- errcnt=errcnt+1;
- };
- };
- };
- /*}}} */
- ;
- break;}
- case 19:
- #line 138 "xbwparser.y"
- {
- /*{{{ */
- {
- XbWDDb_DbIStr *TS=(XbWDDb_DbIStr *)yyvsp[-4].ptr;
- if ( (TS->tp & XbWDDb_Typ) == XbWDDb_Str){
- int len;
- len = strlen(yyvsp[-1].strp);
- if (len < TS->len * 2) {
- strcpy((char*)&(TS->nmi[(TS->tp & XbWDDb_NLen)]),yyvsp[-1].strp);
- }
- else {
- XbWFSy_bf1_printf("\nERROR: Cannot set string because not enough space!");
- errcnt=errcnt+1;
- };
- }
- else {
- XbWFSy_bf1_printf("\nERROR: Target is no (str) VAR Element!");
- errcnt=errcnt+1;
- };
- };
- /*}}} */
- ;
- break;}
- case 20:
- #line 160 "xbwparser.y"
- {
- /*{{{ */
- {
- XbWDDb_DbIVar *TT=yyvsp[-4].ptr;
- if ((TT = (XbWDDb_DbIVar*)XbWFDb_VarInh(TT,0,NULL,0)) == NULL) {
- XbWFSy_bf1_printf("\nERROR: Integer VAR Element not found!");
- errcnt=errcnt+1;
- }
- else {
- switch (TT->tp & XbWDDb_Typ){
- case XbWDDb_Int: {
- XbWDDb_DbIInt *TTRG = (XbWDDb_DbIInt *)TT;
- TTRG->inh = yyvsp[-1].val;
- };
- break;
- case XbWDDb_Dbl: {
- XbWDDb_DbIDbl *TTRG = (XbWDDb_DbIDbl *)TT;
- TTRG->inh = yyvsp[-1].val;
- };
- break;
- default:
- XbWFSy_bf1_printf("\nERROR: Target is no (int/dbl) VAR Element!");
- errcnt=errcnt+1;
- };
- };
- };
- /*}}} */
- ;
- break;}
- case 21:
- #line 188 "xbwparser.y"
- {
- /*{{{ */
- {
- XbWDDb_DbIVar *TT=yyvsp[-4].ptr;
- if ((TT = (XbWDDb_DbIVar*)XbWFDb_VarInh(TT,0,NULL,0)) == NULL) {
- XbWFSy_bf1_printf("\nERROR: Integer VAR Element not found!");
- errcnt=errcnt+1;
- }
- else {
- switch (TT->tp & XbWDDb_Typ){
- case XbWDDb_Int: {
- XbWDDb_DbIInt *TTRG = (XbWDDb_DbIInt *)TT;
- TTRG->inh+= yyvsp[-1].val;
- };
- break;
- case XbWDDb_Dbl: {
- XbWDDb_DbIDbl *TTRG = (XbWDDb_DbIDbl *)TT;
- TTRG->inh+= yyvsp[-1].val;
- };
- break;
- default:
- XbWFSy_bf1_printf("\nERROR: Target is no (int/dbl) VAR Element!");
- errcnt=errcnt+1;
- };
- };
- };
- /*}}} */
- ;
- break;}
- case 22:
- #line 216 "xbwparser.y"
- {
- /*{{{ */
- {
- XbWDDb_DbIVar *TT=yyvsp[-4].ptr;
- if ((TT = (XbWDDb_DbIVar*)XbWFDb_VarInh(TT,0,NULL,0)) == NULL) {
- XbWFSy_bf1_printf("\nERROR: Integer VAR Element not found!");
- errcnt=errcnt+1;
- }
- else {
- switch (TT->tp & XbWDDb_Typ){
- case XbWDDb_Int: {
- XbWDDb_DbIInt *TTRG = (XbWDDb_DbIInt *)TT;
- TTRG->inh -= yyvsp[-1].val;
- };
- break;
- case XbWDDb_Dbl: {
- XbWDDb_DbIDbl *TTRG = (XbWDDb_DbIDbl *)TT;
- TTRG->inh -= yyvsp[-1].val;
- };
- break;
- default:
- XbWFSy_bf1_printf("\nERROR: Target is no (int/dbl) VAR Element!");
- errcnt=errcnt+1;
- };
- };
- };
- /*}}} */
- ;
- break;}
- case 23:
- #line 244 "xbwparser.y"
- {
- /*{{{ */
- {
- XbWDDb_DbIVar *TT=yyvsp[-7].ptr;
- if ((TT = (XbWDDb_DbIVar*)XbWFDb_VarInh(TT,0,NULL,0)) == NULL) {
- XbWFSy_bf1_printf("\nERROR: Integer VAR Element not found!");
- errcnt=errcnt+1;
- }
- else {
- switch (TT->tp & XbWDDb_Typ){
- case XbWDDb_Int: {
- XbWDDb_DbIInt *TTRG = (XbWDDb_DbIInt *)TT;
- TTRG->inh+= yyvsp[-4].val;
- if (TTRG->inh > yyvsp[-2].val){
- TTRG->inh = yyvsp[-2].val;
- };
- };
- break;
- case XbWDDb_Dbl: {
- XbWDDb_DbIDbl *TTRG = (XbWDDb_DbIDbl *)TT;
- TTRG->inh+= yyvsp[-4].val;
- if (TTRG->inh > yyvsp[-2].val){
- TTRG->inh = yyvsp[-2].val;
- };
- };
- break;
- default:
- XbWFSy_bf1_printf("\nERROR: Target is no (int/dbl) VAR Element!");
- errcnt=errcnt+1;
- };
- };
- };
- /*}}} */
- ;
- break;}
- case 24:
- #line 278 "xbwparser.y"
- {
- /*{{{ */
- {
- XbWDDb_DbIVar *TT=yyvsp[-7].ptr;
- if ((TT = (XbWDDb_DbIVar*)XbWFDb_VarInh(TT,0,NULL,0)) == NULL) {
- XbWFSy_bf1_printf("\nERROR: Integer VAR Element not found!");
- errcnt=errcnt+1;
- }
- else {
- switch (TT->tp & XbWDDb_Typ){
- case XbWDDb_Int: {
- XbWDDb_DbIInt *TTRG = (XbWDDb_DbIInt *)TT;
- TTRG->inh -= yyvsp[-4].val;
- if (TTRG->inh < yyvsp[-2].val){
- TTRG->inh = yyvsp[-2].val;
- };
- };
- break;
- case XbWDDb_Dbl: {
- XbWDDb_DbIDbl *TTRG = (XbWDDb_DbIDbl *)TT;
- TTRG->inh -= yyvsp[-4].val;
- if (TTRG->inh < yyvsp[-2].val){
- TTRG->inh = yyvsp[-2].val;
- };
- };
- break;
- default:
- XbWFSy_bf1_printf("\nERROR: Target is no (int/dbl) VAR Element!");
- errcnt=errcnt+1;
- };
- };
- };
- /*}}} */
- ;
- break;}
- case 25:
- #line 312 "xbwparser.y"
- { yyerrok; ;
- break;}
- case 26:
- #line 314 "xbwparser.y"
- { yyval.val=fpar_call(yyvsp[-3].strp); ;
- break;}
- case 27:
- #line 316 "xbwparser.y"
- { fpar_add(1,yyvsp[0].strp,0,0,NULL); ;
- break;}
- case 28:
- #line 317 "xbwparser.y"
- { fpar_add(2,0,yyvsp[0].val,0,NULL); ;
- break;}
- case 29:
- #line 318 "xbwparser.y"
- { fpar_add(10,0,0,0,yyvsp[0].ptr); ;
- break;}
- case 30:
- #line 319 "xbwparser.y"
- { fpar_add(1,yyvsp[0].strp,0,0,NULL); ;
- break;}
- case 31:
- #line 320 "xbwparser.y"
- { fpar_add(2,0,yyvsp[0].val,0,NULL); ;
- break;}
- case 32:
- #line 321 "xbwparser.y"
- { fpar_add(10,0,0,0,yyvsp[0].ptr); ;
- break;}
- case 33:
- #line 323 "xbwparser.y"
- {
- yyval.ptr = (XbWDDb_DbIVar *)XbWFDb_GetDbI(yyvsp[-4].strp,yyvsp[-2].strp,yyvsp[0].strp);
- ;
- break;}
- case 34:
- #line 326 "xbwparser.y"
- {
- /*{{{ */
- (XbWDDb_DbIPtr *)yyval.ptr = (XbWDDb_DbIVar *)NULL;
- /*}}} */
- ;
- break;}
- case 35:
- #line 332 "xbwparser.y"
- {
- yyval.ptr = (XbWDDb_DbIVar *)XbWFDb_GetDbI(yyvsp[-4].strp,yyvsp[-2].strp,yyvsp[0].strp);
- ;
- break;}
- case 36:
- #line 336 "xbwparser.y"
- {
- yyval.ptr = (XbWDDb_DbIVar *)XbWFDb_GetDbI(yyvsp[-4].strp,yyvsp[-2].strp,yyvsp[0].strp);
- ;
- break;}
- case 37:
- #line 339 "xbwparser.y"
- {
- yyval.ptr = (XbWDDb_DbIVar *)XbWFDb_GetDbI(yyvsp[-4].strp,yyvsp[-2].strp,yyvsp[0].strp);
- ;
- break;}
- case 38:
- #line 343 "xbwparser.y"
- { yyval.val = yyvsp[0].val; ;
- break;}
- case 39:
- #line 344 "xbwparser.y"
- { yyval.val = yyvsp[-1].tptr->value.var; ;
- break;}
- case 40:
- #line 345 "xbwparser.y"
- { yyval.val = (yyvsp[-3].val == yyvsp[0].val); ;
- break;}
- case 41:
- #line 346 "xbwparser.y"
- { yyval.val = (yyvsp[-3].val != yyvsp[0].val); ;
- break;}
- case 42:
- #line 347 "xbwparser.y"
- { yyval.val = (yyvsp[-2].val < yyvsp[0].val); ;
- break;}
- case 43:
- #line 348 "xbwparser.y"
- { yyval.val = (yyvsp[-2].val > yyvsp[0].val); ;
- break;}
- case 44:
- #line 349 "xbwparser.y"
- { yyval.val = (yyvsp[-3].val <= yyvsp[0].val); ;
- break;}
- case 45:
- #line 350 "xbwparser.y"
- { yyval.val = (yyvsp[-3].val >= yyvsp[0].val); ;
- break;}
- case 46:
- #line 351 "xbwparser.y"
- { yyval.val = (yyvsp[-3].val != yyvsp[0].val); ;
- break;}
- case 47:
- #line 352 "xbwparser.y"
- { yyval.val = yyvsp[-2].val+yyvsp[0].val; ;
- break;}
- case 48:
- #line 353 "xbwparser.y"
- { yyval.val = yyvsp[-2].val-yyvsp[0].val; ;
- break;}
- case 49:
- #line 354 "xbwparser.y"
- { yyval.val = yyvsp[-2].val/yyvsp[0].val; ;
- break;}
- case 50:
- #line 355 "xbwparser.y"
- { yyval.val = yyvsp[-2].val*yyvsp[0].val; ;
- break;}
- case 51:
- #line 356 "xbwparser.y"
- { yyval.val = -yyvsp[0].val; ;
- break;}
- case 52:
- #line 357 "xbwparser.y"
- { yyval.val = yyvsp[-1].val; ;
- break;}
- case 53:
- #line 358 "xbwparser.y"
- { yyval.val = yyvsp[-1].val; ;
- break;}
- case 54:
- #line 359 "xbwparser.y"
- { yyval.val = (strcmp(yyvsp[-3].strp,yyvsp[0].strp) == 0); ;
- break;}
- case 55:
- #line 360 "xbwparser.y"
- { yyval.val = (strcmp(yyvsp[-2].strp,yyvsp[0].strp) > 0); ;
- break;}
- case 56:
- #line 361 "xbwparser.y"
- { yyval.val = (strcmp(yyvsp[-2].strp,yyvsp[0].strp) < 0); ;
- break;}
- case 57:
- #line 362 "xbwparser.y"
- { yyval.val = (strcmp(yyvsp[-3].strp,yyvsp[0].strp) >= 0); ;
- break;}
- case 58:
- #line 363 "xbwparser.y"
- { yyval.val = (strcmp(yyvsp[-3].strp,yyvsp[0].strp) <= 0); ;
- break;}
- case 59:
- #line 364 "xbwparser.y"
- { yyval.val = (strcmp(yyvsp[-3].strp,yyvsp[0].strp) != 0); ;
- break;}
- case 60:
- #line 365 "xbwparser.y"
- { yyval.val = yyvsp[0].val ; ;
- break;}
- case 61:
- #line 366 "xbwparser.y"
- {
- /*{{{ */
- {
- XbWDDb_DbIVar *TT= yyvsp[0].ptr;
- if ((TT = (XbWDDb_DbIVar*)XbWFDb_VarInh(TT,0,NULL,0)) == NULL) {
- XbWFSy_bf1_printf("\nERROR: Integer VAR Element not found!");
- errcnt=errcnt+1;
- }
- else {
- switch (TT->tp & XbWDDb_Typ){
- case XbWDDb_Int: {
- XbWDDb_DbIInt *TTRG = (XbWDDb_DbIInt *)TT;
- yyval.val = (double)TTRG->inh;
- };
- break;
- case XbWDDb_Dbl: {
- XbWDDb_DbIDbl *TTRG = (XbWDDb_DbIDbl *)TT;
- yyval.val = TTRG->inh;
- };
- break;
- default:
- XbWFSy_bf1_printf("\nERROR: Source of ptr is no numeric VAR Element!");
- errcnt=errcnt+1;
- };
- };
- };
- /*}}} */
- ;
- break;}
- case 62:
- #line 395 "xbwparser.y"
- {
- yyval.strp=yyvsp[0].strp;
- ;
- break;}
- case 63:
- #line 398 "xbwparser.y"
- {
- /*{{{ */
- {
- XbWDDb_DbIVar *TT=(XbWDDb_DbIVar *)yyvsp[0].ptr;
- if ((TT = (XbWDDb_DbIVar*)XbWFDb_VarInh(TT,0,NULL,0)) == NULL) {
- XbWFSy_bf1_printf("\nERROR: String VAR Element not found!");
- errcnt=errcnt+1;
- }
- else {
- if ( (TT->tp & XbWDDb_Typ) == XbWDDb_Str){
- XbWDDb_DbIStr *TS = (XbWDDb_DbIStr *)TT;
- yyval.strp = (char *)&(TS->nmi[(TS->tp & XbWDDb_NLen)]);
- }
- else {
- XbWFSy_bf1_printf("\nERROR: target of pointer is no string!");
- errcnt++;
- };
- };
- };
- /*}}} */
- ;
- break;}
- case 64:
- #line 419 "xbwparser.y"
- {
- yyval.strp = yyvsp[0].tptr->value.strp;
- ;
- break;}
- case 65:
- #line 422 "xbwparser.y"
- {
- /*{{{ */
- strcpy((char*)&scratch[scratchno][0],yyvsp[-2].strp);
- strcat((char*)&scratch[scratchno][0],yyvsp[0].strp);
- yyval.strp=(char*)&scratch[scratchno][0];
- scratchno++;
- if (scratchno>=scratchmax){
- scratchno=0;
- };
- /*}}} */
- ;
- break;}
- case 66:
- #line 433 "xbwparser.y"
- {
- yyval.strp=yyvsp[-1].strp;
- ;
- break;}
- case 67:
- #line 436 "xbwparser.y"
- {
- yyval.strp=yyvsp[-1].strp;
- ;
- break;}
- }
- /* the action file gets copied in in place of this dollarsign */
- #line 465 "/usr/lib/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
- #ifdef YYLSP_NEEDED
- yylsp -= yylen;
- #endif
-
- #if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
- #endif
-
- *++yyvsp = yyval;
-
- #ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
- #endif
-
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTBASE];
-
- goto yynewstate;
-
- yyerrlab: /* here on detecting error */
-
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
- {
- ++yynerrs;
-
- #ifdef YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (yyn > YYFLAG && yyn < YYLAST)
- {
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) malloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
-
- if (count < 5)
- {
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
- }
- yyerror(msg);
- free(msg);
- }
- else
- yyerror ("parse error; also virtual memory exceeded");
- }
- else
- #endif /* YYERROR_VERBOSE */
- yyerror("parse error");
- }
-
- goto yyerrlab1;
- yyerrlab1: /* here on error raised explicitly by an action */
-
- if (yyerrstatus == 3)
- {
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
- #endif
-
- yychar = YYEMPTY;
- }
-
- /* Else will try to reuse lookahead token
- after shifting the error token. */
-
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
-
- yyerrdefault: /* current state does not do anything special for the error token. */
-
- #if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
- #endif
-
- yyerrpop: /* pop the current state because it cannot handle the error token */
-
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
- #ifdef YYLSP_NEEDED
- yylsp--;
- #endif
-
- #if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
- #endif
-
- yyerrhandle:
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
-
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
-
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrpop;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- #if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
- #endif
-
- *++yyvsp = yylval;
- #ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
- #endif
-
- yystate = yyn;
- goto yynewstate;
- }
- #line 440 "xbwparser.y"
-
-
- symrec *sym_table = (symrec *)0;
-
- symrec *putsym(char *sym_name, int sym_type){
- /*{{{ */
- symrec *ptr;
- ptr=(symrec*)malloc(sizeof(symrec));
- ptr->malloc_used=0;
- ptr->name=(char*)malloc(strlen(sym_name)+1);
- strcpy(ptr->name,sym_name);
- ptr->type=sym_type;
- ptr->value.strp = 0;
- ptr->value.var = 0;
- ptr->value.ivar = 0;
- ptr->next=(struct symrec *)sym_table;
- sym_table=ptr;
- return ptr;
- };
- /*}}} */
- symrec *getsym(char *sym_name){
- /*{{{ */
- symrec *ptr;
- for (ptr=sym_table;ptr!= (symrec *)0; ptr=(symrec *)ptr->next){
- if (strcmp(ptr->name,sym_name)==0){
- return(ptr);
- };
- };
-
- return(NULL);
- };
- /*}}} */
-
- int put_lval_end_command(void){
- /*{{{ */
- return(ENDFILE);
- };
-
- /*}}} */
- int put_lval_double(double dd){
- /*{{{ */
- yylval.val = dd;
- return(NUM);
- };
-
- /*}}} */
- int put_lval_string(char *str){
- /*{{{ */
- strcpy((char*)&scratch[scratchno][0],str);
- yylval.strp=(char*)&scratch[scratchno][0];
- scratchno++;
- if (scratchno>=scratchmax){
- scratchno=0;
- };
- return(STR);
- };
-
- /*}}} */
- int put_lval_numvar(char *varname){
- /*{{{ */
- symrec *s = getsym(varname);
- if (s==0){
- s=putsym(varname,NUMVAR);
- s->malloc_used=0;
- };
- yylval.tptr = s;
- return(s->type);
- };
-
- /*}}} */
- int put_lval_nullptr(void){
- /*{{{ */
- return(NULLPTR);
- };
-
- /*}}} */
- int put_lval_strvar(char *varname){
- /*{{{ */
- symrec *s = getsym(varname);
- if (s==0){
- s=putsym(varname,STRVAR);
- s->malloc_used=1;
- s->value.strp = (char*)malloc(200);
- };
- yylval.tptr = s;
- return(s->type);
- };
-
- /*}}} */
- int put_lval_pointer(char type, char *str){
- /*{{{ */
- strcpy((char*)&scratch[scratchno][0],str);
- yylval.strp=(char*)&scratch[scratchno][0];
- scratchno++;
- if (scratchno>=scratchmax){
- scratchno=0;
- };
- switch(type){
- case 'p': /*ptr*/ return(NPTR);
- case 's': /*str*/ return(SPTR);
- case 'i': /*int*/ return(IPTR);
- case 'd': /*dbl*/ return(DPTR);
- default: XbWFSy_bf1_printf("\nERROR: illegal pointer type");
- return(STR);
- break;
- };
- };
-
- /*}}} */
- int put_lval_num_macropar(int no){
- /*{{{ */
- yylval.val = (double)((int)macpar[macparlvl-1][no]);
- return(NUM);
- };
-
- /*}}} */
- int put_lval_str_macropar(int no){
- /*{{{ */
- yylval.strp = (char *)macpar[macparlvl-1][no];
- return(STR);
- };
-
- /*}}} */
- int put_lval_var(char *varname){
- /*{{{ */
- symrec *s = getsym(varname);
- if (s==0){
- s=putsym(varname,NUMVAR);
- s->malloc_used=0;
- };
- yylval.tptr = s;
- return(s->type);
- return(0);
- };
-
- /*}}} */
- int put_lval_isvar(char *varname){
- /*{{{ */
- symrec *s = getsym(varname);
- if (s==0){
- return(0);
- };
- return(1);
- };
-
- /*}}} */
- int put_lval_if(void){
- /*{{{ */
- return(IF);
- };
-
- /*}}} */
- int put_lval_then(void){
- /*{{{ */
- return(THEN);
- };
-
- /*}}} */
- int yyerror(char*s){
- XbWFSy_bf_printf("\nERROR in statement after %s:\n",func_lastname);
- printf(s);
- errcnt++;
- return(0);
- };
-
- char *fltoa(double dd){
- static char sstr[100];
- sprintf(sstr,"%d",(int)dd);
- return(sstr);
- };
-
- void fpar_add(
- /*{{{ */
- int type,
- char *txt,
- double dval,
- int ival,
- XbWDDb_DbIVar *ptr){
- fpar_count++;
- switch (type){
- case 1: fpar[fpar_count]= (void*)txt;
- fpart[fpar_count]= XbWDMf_StrPar;
- break;
- case 2: fpar[fpar_count]= (void*)((int)dval);
- fpard[fpar_count]= dval;
- fpart[fpar_count]= XbWDMf_IntPar;
- break;
- case 3: fpar[fpar_count]= (void*)((int)ival);
- fpard[fpar_count]= ival;
- fpart[fpar_count]= XbWDMf_IntPar;
- break;
- case 10: fpar[fpar_count]= (void*)(ptr);
- fpart[fpar_count]= XbWDMf_VLPar;
- break;
- case 11:{
- /*{{{ */
- XbWDDb_DbIVar *ac_gp = ptr;
- char *dd;
- if ((ac_gp = (XbWDDb_DbIVar*)XbWFDb_VarInh(ac_gp,0,NULL,1)) == NULL) {
- XbWFSy_bf1_printf("\nERROR: cannot get pointer parameter!");
- errcnt = errcnt+1;
- return;
- };
- switch( ac_gp->tp & XbWDDb_Typ) {
- case XbWDDb_Str: dd = (char*)&(((XbWDDb_DbIStr *)ac_gp)->nmi[ac_gp->tp & XbWDDb_NLen]); break;
- default:
- XbWFSy_bf1_printf("\nERROR: cannot get pointer parameter!");
- errcnt = errcnt+1;
- return;
- };
- fpar[fpar_count]= (void*)(dd);
- fpart[fpar_count]= XbWDMf_VIPar;
- printf("\npar. %d ((str)*) = %d",fpar_count,(int)ptr);
- };
- /*}}} */
- case 12:{
- /*{{{ */
- XbWDDb_DbIVar *ac_gp = ptr;
- int dd;
- if ((ac_gp = (XbWDDb_DbIVar*)XbWFDb_VarInh(ac_gp,0,NULL,1)) == NULL) {
- XbWFSy_bf1_printf("\nERROR: cannot get pointer parameter!");
- errcnt = errcnt+1;
- return;
- };
- switch( ac_gp->tp & XbWDDb_Typ) {
- case XbWDDb_Int: dd = ((XbWDDb_DbIInt *)ac_gp)->inh; break;
- default:
- XbWFSy_bf1_printf("\nERROR: cannot get pointer parameter!");
- errcnt = errcnt+1;
- return;
- };
- fpar[fpar_count]= (void*)(dd);
- fpart[fpar_count]= XbWDMf_VPPar;
- printf("\npar. %d ((int)*) = %d",fpar_count,(int)ptr);
- };
- /*}}} */
- break;
- case 13: fpar[fpar_count]= (void*)(ptr);
- fpart[fpar_count]= XbWDMf_VIPar;
- break;
- };
- };
- /*}}} */
- double fpar_call(char *name){
- /*{{{ */
- double result=0;
- fpar[0]=(void*)fpar_count;
- fpart[0]=XbWDMf_AnzPar;
- if (name[1]==0){
- switch(name[0]){
- case 'h':
- printf("\n");
- XbWFSy_bf_printf("%s","XbW Commands:");
- printf("\n");
- fpar[0]=-1;
- fpar[1]=(void*)"s"; XbWFDb_AppStr(&fpar,&fpart);
- fpar[1]=(void*)"i"; XbWFDb_AppInt(&fpar,&fpart);
- fpar[1]=(void*)"c"; XbWFDb_AppCSt(&fpar,&fpart);
- fpar[1]=(void*)"d"; XbWFDb_AppDblVal(&fpar,0);
- printf("\n");
- printf("\n");
- printf("\n");
- break;
-
- case 's': result = XbWFDb_AppStr(&fpar,&fpart); break;
- case 'i': result = XbWFDb_AppInt(&fpar,&fpart); break;
- case 'c': result = XbWFDb_AppCSt(&fpar,&fpart); break;
- case 'o': result = XbWFDb_AppObj(&fpar,&fpart); break;
- case 'd': result = XbWFDb_AppDblVal(&fpar,fpard[2]); break;
- case 'x': result = XbWFMf_StrtHookCmd(&fpar,&fpart); break;
- default: goto errleave;
- };
- goto leave;
- }
- else {
- if (strcmp(name,"bg")==0){
- if (fpart[3] == XbWDMf_IntPar){
- /*{{{ */
- if ( (double)((int)fpar[3]) == (double)fpard[3]){
- result = XbWFDb_AppBg(&fpar,&fpart);
- }
- else {
- char sstr[100];
- sprintf(sstr,"%40.20f",fpard[3]);
- fpart[3]= XbWDMf_DblPar;
- fpar[3]=&sstr;
- result = XbWFDb_AppBg(&fpar,&fpart);
- };
- /*}}} */
- }
- else {
- result = XbWFDb_AppBg(&fpar,&fpart);
- };
- goto leave; };
- if (strcmp(name,"cn")==0){ result = XbWFDb_AppChn(&fpar,&fpart); goto leave; };
- if (strcmp(name,"eg")==0){ result = XbWFDb_AppGPtr(&fpar,&fpart); goto leave; };
- if (strcmp(name,"pn")==0){ result = XbWFDb_AppNPtr(&fpar,&fpart); goto leave; };
- if (strcmp(name,"tk")==0){ result = XbWFDb_AppTsk(&fpar,&fpart); goto leave; };
- if (strcmp(name,"ff")==0){ result = XbWFDb_AppFloat(&fpar,&fpart); goto leave; };
- if (strcmp(name,"lt")==0){ result = XbWFDb_AppLight(&fpar,&fpart); goto leave; };
- if (strcmp(name,"ng")==0){ result = XbWFDb_NewGrp(&fpar,&fpart); goto leave; };
- if (strcmp(name,"wdw")==0){ result = XbWFDb_AppWdw(&fpar,&fpart); goto leave; };
- if (strcmp(name,"End")==0){
- end_include();
- yyclearin;
- macparlvl--;
- if (macparlvl < 1){
- macparlvl = 1;
- };
- goto leave;
- };
-
- if (strcmp(name,"sin")==0){ result = sin(fpard[1]); goto leave; };
- if (strcmp(name,"cos")==0){ result = cos(fpard[1]); goto leave; };
- if (strcmp(name,"atan")==0){ result = atan(fpard[1]); goto leave; };
- if (strcmp(name,"log")==0){ result = log(fpard[1]); goto leave; };
- if (strcmp(name,"exp")==0){ result = exp(fpard[1]); goto leave; };
- if (strcmp(name,"sqrt")==0){ result = sqrt(fpard[1]); goto leave; };
-
- if (strcmp(name,"Array")==0){ result = XbWFDb_CreateArray(&fpar,&fpart); goto leave; };
-
- if (strcmp(name,"DrawAllWdw")==0){ XbWFWd_DrawAll(); goto leave; };
- if (strcmp(name,"IconAllWdw")==0){ XbWFWd_IconAll(); goto leave; };
- if (strcmp(name,"IconizeWdw")==0){ XbWFWd_Iconize(&fpar); goto leave; };
- if (strcmp(name,"SelectWdw")==0){ result = XbWFWd_Select(&fpar); goto leave; };
- if (strcmp(name,"DrawWdw")==0){ XbWFWd_DrawP(); goto leave; };
-
- if (strcmp(name,"NewProject")==0){ result = XbWFDb_MarkPrj(&fpar,&fpart); goto leave; };
- if (strcmp(name,"NewGroup")==0){ result = XbWFDb_MarlGrp(&fpar); goto leave; };
-
- if (strcmp(name,"Malloc")==0){ result = XbWFDb_CreaSys(&fpar); goto leave; };
- if (strcmp(name,"Exit")==0){ XbWFSy_SysStop(); goto leave; };
-
- if (strcmp(name,"DumpFile")==0){ result = XbWFDb_DbgSys(&fpar); goto leave; };
- if (strcmp(name,"WriteFile")==0){ result = XbWFDb_WrTable(&fpar,&fpart); goto leave; };
- if (strcmp(name,"ReadFile")==0){ result = XbWFDb_RdTable(&fpar,&fpart); goto leave; };
- if (strcmp(name,"EditFile")==0){ result = XbWFDb_OpenSys(&fpar,&fpart); goto leave; };
-
- if (strcmp(name,"Message")==0){ XbWFTb_PutMessage(&fpar); goto leave; };
- if (strcmp(name,"Alarm")==0){ XbWFTb_PutAlarm(&fpar); goto leave; };
- if (strcmp(name,"Error")==0){ XbWFTb_PutError(&fpar); goto leave; };
- if (strcmp(name,"WaitForButton")==0){ XbWSMs_WButtUpDn(); goto leave; };
- if (strcmp(name,"AnswPReq")==0){ result = XbWFTb_AnswerPopUpReq(&fpar); goto leave; };
- if (strcmp(name,"PopUpBox")==0){ XbWFTb_PopUpBox(&fpar); goto leave; };
- if (strcmp(name,"PopUpMSG")==0){ result = XbWSPu_Msg(&fpar,&fpart); goto leave; };
- if (strcmp(name,"PopUpDIR")==0){ result = XbWSPu_Dir(&fpar,&fpart); goto leave; };
- if (strcmp(name,"PopEditDir")==0){ result = XbWSPu_DirEd(&fpar,&fpart); goto leave; };
-
- if (strcmp(name,"LockWdw")==0){ XbWFWd_LockON(); goto leave; };
- if (strcmp(name,"LockWdwOnClick")==0){ XbWFWd_LockEdit(); goto leave; };
- if (strcmp(name,"UnLockWdw")==0){ XbWFWd_LockOFF(); goto leave; };
-
- if (strcmp(name,"MFXGroup")==0){ result = XbWFMx_RWGroup(&fpar,&fpart); goto leave; };
-
- if (strcmp(name,"EditObj")==0){ result = XbWFOb_EditOnly(&fpar); goto leave; };
- if (strcmp(name,"DispObj")==0){ result = XbWFOb_DispOnly(&fpar); goto leave; };
-
- if (strcmp(name,"ResizeWdw")==0){ XbWSWd_Resize(&fpar); goto leave; };
- if (strcmp(name,"MoveWdw")==0){ XbWSWd_Move(); goto leave; };
- if (strcmp(name,"ClrScr")==0){ XbWFTb_ClrScr(); goto leave; };
- if (strcmp(name,"MoveObjToWdw")==0){result = XbWFOb_MovToWdw(&fpar,&fpart); goto leave; };
- if (strcmp(name,"MouseWarp")==0){ result = XbWFTb_MouseWarp(&fpar,&fpart); goto leave; };
- if (strcmp(name,"XFlush")==0){ XbWFSY_DoXFlush(); goto leave; };
- if (strcmp(name,"RootWindow")==0){ result = XbWSSy_RootWindow(&fpar,&fpart); goto leave; };
- if (strcmp(name,"LoadFont")==0){ result = XbWFDb_LoadFont(&fpar,&fpart); goto leave; };
-
- if (strcmp(name,"PrjName")==0){ result = XbWFDb_PrjName(&fpar,&fpart); goto leave; };
- if (strcmp(name,"PackString")==0){ result = XbWFTb_PackStr(&fpar,&fpart); goto leave; };
- if (strcmp(name,"FFileNames")==0){ result = XbWSOS_FilDir(&fpar); goto leave; };
- if (strcmp(name,"GetWGrp")==0){ result = XbWFDb_StorGrpn(&fpar,&fpart); goto leave; };
- if (strcmp(name,"DebugMfxON")==0){ XbWFMx_DbgON(); goto leave; };
- if (strcmp(name,"DebugMtaON")==0){ XbWFTb_DbgMta(); goto leave; };
- if (strcmp(name,"AutoCloseON")==0){ XbWFTb_AClosON(); goto leave; };
- if (strcmp(name,"AutoCloseOFF")==0){ XbWFTb_AClosOFF(); goto leave; };
- if (strcmp(name,"RedrawON")==0){ XbWFTb_RedrawON(); goto leave; };
- if (strcmp(name,"RedrawOFF")==0){ XbWFTb_RedrawOFF(); goto leave; };
-
- if (strcmp(name,"Unlink")==0){ result = XbWFTb_Unlink(&fpar); goto leave; };
- if (strcmp(name,"Task")==0){ result = XbWSOS_SpwnStd(&fpar,&fpart); goto leave; };
- if (strcmp(name,"ChDir")==0){ result = XbWFSy_ChDir(&fpar,&fpart); goto leave; };
- if (strcmp(name,"LoadObjIcon")==0){ result = XbWSSy_ObjLoadIcon(&fpar,&fpart); goto leave; };
-
- if (strcmp(name,"SelectPrj")==0){ result = XbWFDb_SetProject(&fpar,&fpart); goto leave; };
-
- };
- errleave:;
- XbWFSy_bf_printf("\nERROR: function %s not recognized.",name); errcnt=errcnt+1;
- fpar_count=0;
- return(0);
- leave:;
- strcpy(func_lastname,name);
- fpar_count=0;
- return(result);
- };
- /*}}} */
- int macpar_call(char *name){
- /*{{{ */
- int ii;
- int result=0;
- fpar[0]=(void*)fpar_count;
- fpart[0]=XbWDMf_AnzPar;
-
- for (ii=0;ii<=fpar_count;ii++){
- macpar[macparlvl][ii]=fpar[ii];
- macpar_type[macparlvl][ii]=fpart[ii];
- };
-
- macparlvl++;
- if (macparlvl >= MAX_mac_lvl){
- macparlvl= MAX_mac_lvl;
- };
-
- if (begin_include(name)==0){
- XbWFSy_bf_printf("\nERROR: macro file %s not found;",name);
- };
- yyclearin;
-
- fpar_count=0;
- strcpy(func_lastname,name);
- return(result);
- };
- /*}}} */
-
-
- void XbWFMf_ReadMF(char *filename){
- /*{{{ */
-
- extern FILE *yyin;
-
- #ifdef YYDEBUG
- yydebug=0;
- #endif
- errcnt=0;
- if (filename == NULL) {
- yyin = stdin;
- }
- else {
- int ii;
- char sstr[200];
- for (ii=0;ii<strlen(filename);ii++){
- if (filename[ii]=='\\'){ filename[ii]='/'; };
- };
- if (filename[0]=='@'){
- strcpy(filename,(char *)&filename[1]);
- };
- yyin = fopen(filename, "r" );
- if (yyin==NULL){
- sprintf(sstr,"%s.mta",filename);
- yyin = fopen( sstr, "r" );
- if (yyin==NULL){
- sprintf(sstr,"/xw/x/%s.mta",filename);
- yyin = fopen( sstr, "r" );
- if (yyin==NULL){
- sprintf(sstr,"%s.xwx",filename);
- yyin = fopen( sstr, "r" );
- if (yyin==NULL){
- XbWFSy_bf_printf("\nERROR: cannot open file %s !",filename);
- return;
- };
- };
- };
- };
- };
-
- yyparse();
- if (yyin != stdin){
- fclose(yyin);
- };
- if (errcnt){ printf("\nOOPS! There were %d parser errors!",errcnt); }
- else { XbWFSy_bf1_printf("\nFile syntax okay."); };
- };
- /*}}} */
-
- int XbWFMf_ParseMakro(char *macro){
- /*{{{ */
-
- #ifdef YYDEBUG
- yydebug=1;
- #endif
-
- errcnt=0;
-
- begin_macro(macro);
- yyparse();
-
- if (errcnt){ printf("\nOOPS! There were %d parser errors!",errcnt); }
- else { XbWFSy_bf1_printf("\nMacro syntax okay."); };
-
- return(0);
- };
- /*}}} */
-
- void XbWFMf_StartMF(char *filename){
- /*{{{ */
-
- char buffer[10000];
-
- extern FILE *yyin;
-
- #ifdef YYDEBUG
- yydebug=0;
- #endif
-
- if (filename == NULL) {
- XbWFSy_bf1_printf("\nERROR: could not open file (null)!");
- return;
- }
- else {
- int ii;
- char sstr[200];
- for (ii=0;ii<strlen(filename);ii++){
- if (filename[ii]=='\\'){ filename[ii]='/'; };
- };
- if (filename[0]=='@'){
- strcpy(filename,(char *)&filename[1]);
- };
- yyin = fopen(filename, "r" );
- if (yyin==NULL){
- sprintf(sstr,"%s.mta",filename);
- yyin = fopen( sstr, "r" );
- if (yyin==NULL){
- sprintf(sstr,"/xw/x/%s.mta",filename);
- yyin = fopen( sstr, "r" );
- if (yyin==NULL){
- XbWFSy_bf_printf("\nERROR: cannot open file %s !",filename);
- return;
- };
- };
- };
- };
-
- fread(buffer,1,9999,yyin);
-
- if (strstr(buffer,"Malloc") != NULL){
- fseek(yyin,0,SEEK_SET);
- fread(buffer,1,((char*)strstr(buffer,"Malloc")-1-(char*)buffer),yyin);
- begin_macro(buffer);
- yyparse();
- }
- else {
- XbWFSy_bf1_printf("\nERROR: Malloc(<mem>); needed at start of first file!");
- };
- fclose(yyin);
- };
- /*}}} */
-
-